﻿@section header
{
    <style>
        .myAccountActive {
            color: #ff6c1f;
        }
    </style>

}
@section title {
    个人中心
}
@section pagetitle
{
    个人中心

}
@using Kevin.Shop.Business.Service.Entity.Helper
@using RiderShop.Mobile.ServiceEntity.Purchase
@model RiderShop.Mobile.Modle.Purchase.CheckOutModel


<div class="userCenter">
    <header data-role="header">
        <img src="~/Themes/RongJi/Style/base/imgs/us_bg.jpg" style="width:100%;height:auto;">
        <div class="top">
            <span class="img">
                <span class="img_wrap">
                    @if (string.IsNullOrEmpty(WebClientContext.Current.GetCurrentUser(false).HeadImgUrl))
                    {
                        <img src="~/Themes/RongJi/Style/base/imgs/default-res-usercenter_head.png" />
                    }
                    else
                    {
                        <img src="@WebClientContext.Current.CurrentUser.HeadImgUrl" />
                    }
                </span>
            </span>
            <label class="textcenter white">@WebClientContext.Current.CurrentUser.RealName</label>
            <label>
                <div>
                    <span class="text">消费金额</span>
                    <span class="text">@WebClientContext.Current.CurrentUser.Expenditure.ToString("N2")</span>
                </div>
                <div>

                    <span class="text">@WebClientContext.Current.CurrentUser.RankName</span>
                </div>
                <div>
                    <span class="text"><a href="../MyAccount/MyPoint" style="color:#fff">累计鲜豆</a></span>
                    <span class="text"><a href="../MyAccount/MyPoint" style="color:#fff">@Model.UserCurrentPoint</a></span>
                </div>
            </label>

        </div>
    </header>
</div>
<!--End Header-->
<div class="box">
    <div class="list-group">
        <a class="list-group-item" href="OrderList?orderStatus=1">
            待付款
            <span class="badge badge-success">@RiderShop.Mobile.Modle.MyAccount.OrderModel.GetOrderCount(Kevin.Shop.Business.SalesManagement.Enumerations.OrderStatus.待支付)</span>
        </a>
        <a class="list-group-item" href="OrderList?orderStatus=6">
            待收货
            <span class="badge badge-danger ">@RiderShop.Mobile.Modle.MyAccount.OrderModel.GetOrderCount(Kevin.Shop.Business.SalesManagement.Enumerations.OrderStatus.已发货)</span>
        </a>
        <a class="list-group-item" href="OrderList?orderType=0">
            全部订单
        </a>
    </div>

    <div class="list-group">
        <a class="list-group-item" href="MyFavorites">
            我的收藏
        </a>
        <a class="list-group-item" href="MyPromotionCode?promotionType=0">
            我的优惠券
        </a>
        <a class="list-group-item" href="MyPromotionCode?promotionType=1">
            我的红包
        </a>
        @{
            var mycM = new RiderShop.Mobile.Modle.MyAccount.MyCommentModel();
            mycM.GetUserUnReviewComments(0, 1);
        }
        <a class="list-group-item" href="MyComment">
            我的评价
            <span class="badge badge-success">@mycM.TotalCount</span>
        </a>
        @* <a class="list-group-item" href="myVoucher.html">
                我的代金券
            </a>

                        <a class="list-group-item" href="MyPoint">
                            我的鲜豆
                        </a>
        *@
    </div>

    <div class="list-group">
        <a class="list-group-item" href="ShippingAddress">
            我的收货地址
        </a>
        <a class="list-group-item" href="Profile">
            个人资料
        </a>

        <a class="list-group-item" href="/Purchase/YinxinBalance">
            鲜享卡/银信商通卡余额查询
        </a>

        <a class="list-group-item" href="/Purchase/YinxinModifyPassword">
            鲜享卡/银信商通卡改变密码
        </a>
        @if (@WebClientContext.Current.CurrentUser.MSN != "weixinfirstlogin")
        {
            <a class="list-group-item" href="ChangePassword">
                账号安全
            </a>
        }
        <a class="list-group-item" href="~/Content/ContentInfo">
            帮助中心
        </a>
    </div>
    <a type="button" class="btn btn-danger" href="~/Customer/Logout" style="display:block;">退出登录</a>
</div>


@section footer
{
    <script type="text/javascript">
        $(function () {
            //让toolbar选中
            var $homeImg = $("#homeImg");
            var $categoryImg = $("#categoryImg");
            var $myaccountImg = $("#myaccountImg");
            var $searchImg = $("#searchImg");

            $homeImg.attr("src", "/Themes/RongJi/Style/base/imgs/f10.png");
            $categoryImg.attr("src", "/Themes/RongJi/Style/base/imgs/f2.png");
            $myaccountImg.attr("src", "/Themes/RongJi/Style/base/imgs/f3_c.png");
            $searchImg.attr("src", "/Themes/RongJi/Style/base/imgs/f4.png");
        });
    </script>
}